package com.leetcode.August;

/**
 * @Description: 283移动零
 * @Author: Mr.Fxy
 * @CreateTime: 2024-08-15 22:06
 */
public class LC283移动零 {
    public void moveZeroes(int[] nums) {
        int slow=0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i]!=0){
                nums[slow++]=nums[i];
            }
        }
        for (int i = slow; i < nums.length; i++) {
            nums[i]=0;
        }
    }
}
